<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../logo.png">
    <title>事件 - 地图 | 测试</title>
    <script src="../node_modules/clunch/dist/clunch.js"></script>
    <script src="../dist/plain-chart.js"></script>
    <script src="https://unpkg.com/@datapool/china.geojson@1"></script>
    <style>
        #canvas {
            width: 100vw;
            height: 100vh;
        }
    </style>
</head>

<body>

    <div id='canvas'></div>

    <script>

        // 获取图表对象
        var myChart = PlainChart.init(Clunch, document.getElementById('canvas'));

        // 创建图表
        var chart1 = myChart.new({

            grid: {
                left: 0,
                right: 0,
                top: 0,
                bottom: 0
            },

            type: "map",
            data: chinaGeoJSON

        });

        // 绑定事件
        myChart.bind('click', function (target) {
            console.log(target);
        });

    </script>

</body>

</html>
